<%@ include file="/WEB-INF/jsp/common/include.jsp" %>
<%@ page pageEncoding="UTF-8"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<%@ taglib prefix="app" uri="AppTags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<div class="main">
  <!--Paging + Tabs-->
  <div class="paging with-tabs white-box">
    <p>
      <c:set var="secureId">${param.secureId}</c:set>
      <c:set var="editTab">
        <tiles:getAsString name='editTab' ignore='true'/>
      </c:set>
      <c:choose>
        <c:when test="${editTab == 'selected'}">
          <c:url value="/ad/manage/edit.do" var="editLink">
            <c:param name="secureId" value="${secureId}"/>
          </c:url>
          <span class="tab selected"><a class="psevdo" href="${editLink}">Редактировать </a><span
              class="s l"></span><span class="s r"></span></span>
        </c:when>
        <c:otherwise>
          <c:url value="/ad/manage/view.do" var="viewLink">
            <c:param name="secureId" value="${secureId}"/>
          </c:url>
          <span class="tab <tiles:getAsString name='viewTab' ignore='true'/>"><a class="psevdo" href="${viewLink}">Просмотр </a><span
              class="s l"></span><span class="s r"></span></span>
        </c:otherwise>
      </c:choose>
      <c:url value="/ad/manage/statistics/view.do" var="statisticsLink">
        <c:param name="secureId" value="${secureId}"/>
      </c:url>
      <span class="tab <tiles:getAsString name='statisticsTab' ignore='true'/>"><a class="psevdo" href="${statisticsLink}">Статистика </a><span
          class="s l"></span><span class="s r"></span></span>
    </p>
  </div>

  <tiles:insertAttribute name="manageBody" />

</div>